<?php
namespace app\admin\validate;

use think\Validate;

class Team extends Validate
{
    protected $rule = [
        'team_name' => 'require|min:1',
        'team_logo' => 'require',
        'team_message' => 'require|max:500',				'beizhu'	=> 'requireIf:isCheck,2'
    ];

    protected $message = [
        'team_name.require' => '{%team_name_require}',
        'team_logo.require' => '{%team_logo_require}',
        'team_message.require' => '{%team_message_require}',
        'team_message.max' => '{%team_message_max}',
        'beizhu.requireIf'	=> '请输入审核备注',
    ];

    protected $scene = [
        'add'   => ['team_name', 'team_logo', 'team_message', 'team_url', 'team_document', 'status'],
        'edit'  => ['team_name','team_message'],		'beizhu'	=> ['beizhu'],
    ];
}